<?php
require_once("system/funciones_bd.php");
require_once("system/sesion.class.php");
ob_start();
//session_start();
?>
<!DOCTYPE html>
<html lang="de"><!-- use class="debug" here if you develope a template and want to check-->
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
        <!-- some meta tags, important for SEO"--> 
        <meta name="description" content="put a short description in here" />
        <meta name="keywords" content="put your important keywords in here" />
        <meta name="revisit-after" content="7 days" />
        <meta name="robots" content="index,follow" />

        <title>ForensicTooth v1.0</title>

        <link rel="stylesheet" href="css/inuit.css" />
        <link rel="stylesheet" href="css/fluid-grid16-1100px.css" />
        <link rel="stylesheet" href="css/eve-styles.css" />
        <link rel="shortcut icon" href="icon.png" />
        <link rel="apple-touch-icon-precomposed" href="img/icon.png" />

        <script src="js/respond-min.js" type="text/javascript"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
        <script>
            window.jQuery || document.write('<script src="scripts/jquery164min.js">\x3C/script>')</script>
        <!--local fallback for JQuery-->
        <script src="js/jquery.flexslider-min.js" type="text/javascript"></script>
        <link rel="stylesheet" href="css/flexslider.css" />

        <script type="text/javascript">
            $(window).load(function() {
                $('.flexslider').flexslider({
                    animation: "slide",<!--you can also choose fade here-->
                    directionNav: false,<!--Attention: if you choose true here, the nav-buttons will also appear in the ticker! -->
                    keyboardNav: true,
                    mousewheel: true
                });
            });
        </script>
        <style type="text/css" media="screen">
            #flashContent { width:100%; height:100%; }
        </style>

    </head>
    <!--===============================================================  Logo, social and menu =====================================================================================--> 

    <body>
        <div class="wrapper">	
            <a href="index.php" id="logo"><img src="img/logo.png" alt="something" />
                <h1 class="accessibility">ForensicTooth v1.0</h1></a>

            <!--These are just samples, use your own icons. If you use larger ones, make sure too change the css-file to fit them in.
                Dont´t forget to place your links -->
            <div class="social">
            </div>


            <ul id="nav" class="main">
                <li><a href="index.php" class="active">Inicio</a></li>
                <!--                <li><a href="view/subpage.html">Subpage1</a></li>-->
            </ul>


        </div><!--end of wrapper div-->    
        <div class="clear"></div> 

        <!--========================================================================== Intro and FlexSlider =====================================================================================-->    

        <div class="wrapper">   
            <div class="grids top">
                <div class="grid-6 grid intro">
                    <?php
                    $sesion = new sesion();
                    if (isset($_POST["iniciar"])) {
                        $usuario = $_POST['usuario'];
                        $passw = $_POST['password'];
                        $db = new funciones_BD();
                        $user = $db->login($usuario, $passw);
                        if ($user != false) {
                            $sesion->set("usuario", $usuario);
                            $sesion->set("idusuario", $user[0]);
                            $sesion->set("nombre", $user[5]);
                            $sesion->set("apellidos", $user[6]);
                            
                            if ($user != false) {
                                if ($user["id_perfil"] == 1) {
                                    header("location: view/principalAdmin.php");
                                } else if ($user["id_perfil"] == 2) {
                                    header("location: view/principal.php");
                                } else if ($user["id_perfil"] == 3) {
                                    header("location: view/principalForence.php");
                                }
                            } else {
                                echo '<p class="message error"> Por favor, vuelve a introducir tu contraseña.
								  </p>';
                            }
                        } else {
                            echo '<p class="message error"> Por favor, vuelve a introducir tu contraseña.
								  </p>';
                        }
                    }
                    ?>
                    <h2>LOGIN.</h2>
                    <form action="" method="post" id="frmLogin" action="<?php echo $_SERVER['PHP_SELF']; ?>">
                        <input type="text" id="txtUsuario" name="usuario" placeholder="Usuario" class="input"  required>
                        <input type="password" name="password"  id="txtClave" placeholder="clave" class="input" required>  

                        <input type="submit" name="iniciar" class="button" id="btnLogin" value="Inicio Sesion" />
                    </form>
                </div><!--end of slogan div-->

                <div class="grid-10 grid" style="margin-top: -180px;"> <!--http://flex.madebymufffin.com/-->

                    <div id="flashContent" style="width: 100%; height: 100%; ">
                        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="animacion-forensic-tooth" align="middle">
                            <param name="movie" value="animacion-forensic-tooth.swf" />
                            <param name="quality" value="high" />
                            <param name="bgcolor" value="#ffffff" />
                            <param name="play" value="true" />
                            <param name="loop" value="true" />
                            <param name="wmode" value="transparent" />
                            <param name="scale" value="showall" />
                            <param name="menu" value="true" />
                            <param name="devicefont" value="false" />
                            <param name="salign" value="" />
                            <param name="allowScriptAccess" value="sameDomain" />
                            <!--[if !IE]>-->
                            <object type="application/x-shockwave-flash" data="animacion-forensic-tooth.swf" width="670" height="430">
                                <param name="movie" value="animacion-forensic-tooth.swf" />
                                <param name="quality" value="high" />
                                <param name="bgcolor" value="#ffffff" />
                                <param name="play" value="true" />
                                <param name="loop" value="true" />
                                <param name="wmode" value="transparent" />
                                <param name="scale" value="showall" />
                                <param name="menu" value="true" />
                                <param name="devicefont" value="false" />
                                <param name="salign" value="" />
                                <param name="allowScriptAccess" value="sameDomain" />
                                <!--<![endif]-->
                                <a href="http://www.adobe.com/go/getflash">
                                    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Obtener Adobe Flash Player" />
                                </a>
                                <!--[if !IE]>-->
                            </object>
                            <!--<![endif]-->
                        </object>
                    </div>
                </div><!--end of div grid-10-->
            </div><!--end of div grids-->
            <!--<span class="slidershadow"></span>-->

        </div><!--end of div wrapper-->

        <!--========================================================================== Content Part 1 =====================================================================================-->             

        <div class="wrapper">


            <h1 style="font-size: 60px;"><center><strong>ForensicTooth v1.0</strong></center></h1>
            <p align="justify" style="font-size: 23px;" >
                Bienvenido a: <br />
                FORENSIC TOOTH v1.0 fue diseñado para el reconocimiento de personas en odontología forense, que permite al odontólogo registrar los datos de cada paciente y sus características dentales para almacenarlas en una base de datos y de esta manera lograr una posible identificación haciendo uso de este innovador software.
            </p>






        </div><!--end of wrapper-->
        <hr /> 		

        <!--========================================================================== Ticker =====================================================================================-->                    


        <div class=" grids flexslider intro ticker top"><!--http://flex.madebymufffin.com/-->
            <noscript>You have Javascript set to disabled. This ticker runs with Javascript and will only be shown if you turn it on.<br />
            Sie haben Javascript deaktiviert. Dieser Ticker wird nur vollständig angezeigt, wenn Sie Javascript aktivieren.</noscript> 

            <ul class="slides">

                <li>
                    <p class="text-center">
                        En 1945, se identificó el cadáver de Adolfo Hitler, cuando su odontólogo, reconoció la prótesis fija anterosuperior 
                    </p>		
                </li>
                <li>
                    <p class="text-center">
                        La odontología se ha usado para reconocer las víctimas del ataque del WorldTrade Center en 2001
                    </p>
                </li> 
                <li>
                    <p class="text-center">
                        El reconocimiento positivo de Fidel Castaño, paramilitar Colombiano fue posible en un 90% gracias a un cotejo de la carta dental
                    </p>		
                </li>

                <li>                                  
                    <p class="text-center">
                        Mediante un examen dental fue posible, el reconocimiento de  las víctimas del holocausto  del palacio de justicia en 1985
                    </p>
                </li>

            </ul>

        </div><!--end of div flexslider-->
    </div><!--end of wrapper-->

    <!--========================================================================== Footer =====================================================================================-->     
    <div class="wrapper">
        <div id="footer">


            <div class="grids">
                <center>
                    <p>Sistema De Información ForensicTooth v 1.0</p>
                </center>
            </div><!--end of grids-->
        </div><!--end of footer-->
    </div><!--end of wrapper-->


    <script type="text/javascript"><!--Outdated browsers warning/message and link to Browser-Update. Comment or delete it if you don´t want to use it-->
        var $buoop = {}
        $buoop.ol = window.onload;
        window.onload = function() {
            try {
                if ($buoop.ol)
                    $buoop.ol();
            } catch (e) {
            }
            var e = document.createElement("script");
            e.setAttribute("type", "text/javascript");
            e.setAttribute("src", "http://browser-update.org/update.js");
            document.body.appendChild(e);
        }
    </script> 

</body>
</html>